package com.dayatang.android.Task;

import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;

import com.dayatang.android.Activity.R;
import com.dayatang.android.Util.HttpUtil;

public class SubProjectListTask extends AsyncTask<String, Integer, String> {

	private ProgressDialog pd;
	private Context context;
	
	public SubProjectListTask(Context context) {
		this.context = context;
		pd = ProgressDialog.show(context, "", context.getString(R.string.loading), true, true);
	}

	@Override
	protected String doInBackground(String... params) {
	
		String url = params[0] + "/remote/sub-project-list.action?projectid=" + params[1] + "&username=" + params[2];
		String result = HttpUtil.httpclient(url,context);
		
		return result;
	}

	@Override
	protected void onCancelled() {
		super.onCancelled();
	}

	@Override
	protected void onPostExecute(String result) {
		pd.dismiss();
	}

	
}
